package com.zdd.ehe.service.impl;

import com.zdd.ehe.entity.AnalysisForecast;
import com.zdd.ehe.mapper.AnalysisForecastMapper;
import com.zdd.ehe.service.IAnalysisForecastService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ZhuiZhu
 * @since 2023-04-20
 */
@Service
public class AnalysisForecastServiceImpl extends ServiceImpl<AnalysisForecastMapper, AnalysisForecast> implements IAnalysisForecastService {
    @Resource
    private AnalysisForecastMapper analysisForecastMapper;
    /**
     * 新增分析预测
     *
     * @param analysisForecast
     * @return
     */
    @Override
    public int insertAnalysisForecast(AnalysisForecast analysisForecast) {
        return analysisForecastMapper.insert(analysisForecast);
    }

    /**
     * 查询分析预测
     *
     * @return
     */
    @Override
    public List<AnalysisForecast> queryAnalysisForecast() {
        return analysisForecastMapper.selectList(null);
    }
}
